package com.itc.bi.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itc.bi.dto.MqttClientDto;
import com.itc.bi.entity.MqMqttClientEntity;

/**
* @author songxiude
* @description 针对表【mq_mqtt_client(mqtt链接信息表)】的数据库操作Service
* @createDate 2024-07-15 14:36:47
*/
public interface MqMqttClientService extends IService<MqMqttClientEntity> {

    /**
     * 添加mqtt链接
     * @param mqMqttClient
     * @return
     */
    boolean mqttSave(MqMqttClientEntity mqMqttClient);

    /**
     * 修改mqtt链接信息
     * @param mqMqttClient
     * @return
     */
    boolean mqttUpdate(MqMqttClientEntity mqMqttClient);

    /**
     * 获取mqtt链接信息
     * @param mqttClientDto
     * @return
     */
    IPage<MqMqttClientEntity> mqttList(MqttClientDto mqttClientDto);

    /**
     * 手动启动mqtt
     * @param id
     * @return
     */
    boolean startMqtt(Long id);

    /**
     * 删除mqtt链接
     * @param clientId
     * @return
     */
    boolean removeMqtt(String clientId);

    /**
     * 创建链接
     * @param clientEntity
     */
    boolean initMqttServer(MqMqttClientEntity clientEntity);



}
